package com.fengxing.ams.web.facade;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fengxing.ams.web.facade.intf.IScoreFacade;
import com.fengxing.ams.web.facade.mouble.score.IScoreDAO;
import com.fengxing.ams.web.facade.mouble.score.ScoreVO;

@Service
public class ScoreFacade implements IScoreFacade {

	@Autowired
	private IScoreDAO scoreDAO;
	
	@Override
	public ScoreVO convert(Integer year, Integer score, String subject) {
		return scoreDAO.findOne(year, score, subject);
	}

	@Override
	public ScoreVO queryRankingByRanking(Integer year, Integer ranking,
			String subject) {
		return scoreDAO.queryRankingByRanking(year, ranking, subject);
	}

	@Override
	public ScoreVO convert(Integer formYear, Integer toYear, Integer score,
			String subject) {
		return scoreDAO.queryRankingByScoreSubjectYear(formYear, toYear, score, subject);
	}

}
